package com.mybase.app.fourBase;

import android.net.Uri;
import android.provider.BaseColumns;

/**
 * Created by happy_000 on 2014/12/10.
 */
public class ProviderData {
    public static final String AUTHORITY="com.mybase.app.fourBase.MyProvider"; //继承了contentprovider的类的全名
    //数据库名称
    public static final String DATABASE_NAME = "FirstProvider.db";
    //数据库的版本
    public static final int DATABASE_VERSION = 1;
    //表名
    public static final String USERS_TABLE_NAME = "users";

    public static final class UserTableMetaData implements BaseColumns {
        //表名
        public static final String TABLE_NAME="users";
        //访问该ContentProvider的URI
        public static final Uri CONTENT_URI=Uri.parse("content://"+AUTHORITY+"/users");

        public static final String CONTENT_TYPE="vnd.android.cursor.dir/vnd.firstprovider.user";
        public static final String CONTENT_TYPE_ITEM="vnd.android.cursor.item/vnd.firstprovider.user";
        //列名，在users表中添加一个名为name的列
        public static final String USER_NAME="name";
        //默认排序方式
        public static final String DEFAULT_SORT_ORDER="_id desc";
    }
}